package com.bling.common.bean;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;
/**
 * 信息概要
 * @author BLingSoft
 *
 */
@Entity
@Table(name="T_MESSAGEBASIC")
public class MessageBasic implements Serializable {

	private static final long serialVersionUID = 1946718774273184452L;

	private Integer id;//信息主键
	private String cardnumber;//编号 采用当前时间毫秒数计算
	private String title;//标题
	private Integer sort;//排序
	private String createtime;//创建时间
	private Integer top;//是否置顶 0正常 1置顶
	private Integer looknum;//查看次数
	private boolean isdelete;//是否删除 0正常 1删除
	private Integer kindid;//所属分类主键
	private Integer areaid;//所属地区主键
	private boolean isforbiden;//是否禁止 0 正常 1禁止
	private Integer userbasicid;//所属用户主键
	private Integer type;//1-个人  2-商家
	
	private MessageDetail messagedetail;
	private Kind kind;
	private Area area;
	
	public MessageBasic() {
		super();
	}
	public MessageBasic(String cardnumber, String title, Integer sort,
			String createtime, Integer top, Integer looknum, boolean isdelete,
			Integer kindid, Integer areaid, boolean isforbiden,
			Integer userbasicid, Integer type) {
		super();
		this.cardnumber = cardnumber;
		this.title = title;
		this.sort = sort;
		this.createtime = createtime;
		this.top = top;
		this.looknum = looknum;
		this.isdelete = isdelete;
		this.kindid = kindid;
		this.areaid = areaid;
		this.isforbiden = isforbiden;
		this.userbasicid = userbasicid;
		this.type = type;
	}
	
	@Id
	@GeneratedValue
	@Column
	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	
	@Column(length=50)
	public String getCardnumber() {
		return cardnumber;
	}
	public void setCardnumber(String cardnumber) {
		this.cardnumber = cardnumber;
	}
	
	@Column(length=100)
	public String getTitle() {
		return title;
	}
	public void setTitle(String title) {
		this.title = title;
	}
	
	@Column
	public Integer getSort() {
		return sort;
	}
	public void setSort(Integer sort) {
		this.sort = sort;
	}
	
	@Column(length=50)
	public String getCreatetime() {
		return createtime;
	}
	public void setCreatetime(String createtime) {
		this.createtime = createtime;
	}
	
	@Column
	public Integer getTop() {
		return top;
	}
	public void setTop(Integer top) {
		this.top = top;
	}
	
	@Column
	public Integer getLooknum() {
		return looknum;
	}
	public void setLooknum(Integer looknum) {
		this.looknum = looknum;
	}
	
	@Column
	public boolean getIsdelete() {
		return isdelete;
	}
	public void setIsdelete(boolean isdelete) {
		this.isdelete = isdelete;
	}
	
	@Column
	public Integer getKindid() {
		return kindid;
	}
	public void setKindid(Integer kindid) {
		this.kindid = kindid;
	}
	
	@Column
	public Integer getAreaid() {
		return areaid;
	}
	public void setAreaid(Integer areaid) {
		this.areaid = areaid;
	}
	
	@Column
	public boolean getIsforbiden() {
		return isforbiden;
	}
	public void setIsforbiden(boolean isforbiden) {
		this.isforbiden = isforbiden;
	}
	
	@Column
	public Integer getUserbasicid() {
		return userbasicid;
	}
	public void setUserbasicid(Integer userbasicid) {
		this.userbasicid = userbasicid;
	}
	
	@Column
	public Integer getType() {
		return type;
	}
	public void setType(Integer type) {
		this.type = type;
	}
	
	@Transient
	public MessageDetail getMessagedetail() {
		return messagedetail;
	}
	public void setMessagedetail(MessageDetail messagedetail) {
		this.messagedetail = messagedetail;
	}
	@Transient
	public Kind getKind() {
		return kind;
	}
	public void setKind(Kind kind) {
		this.kind = kind;
	}
	@Transient
	public Area getArea() {
		return area;
	}
	public void setArea(Area area) {
		this.area = area;
	}
}
